Skip to content

Conversation

@GormanGit
Copy link
Owner

Checkpoint Rubric

This is the rubric that your instructor will use to grade your checkpoints. Please do not edit.

Checkpoint 1

  • All tests passed: 40 points
  • Proper use of documentation (commenting on code): 15 points
  • Properly indented code: 15 points
  • Demonstrated effective use of JavaScript: 30 points

Checkpoint 2

  • The application works as it should: 40 points
  • Proper use of documentation (commenting on code): 15 points
  • Properly indented code: 15 points
  • Demonstrated effective use of JavaScript and the DOM API: 30 points

Checkpoint 3

  • Use of React: 25 points
  • Accesses an API: 25 points
  • Proper use of documentation (commenting on code): 25 points
  • The application functions as it should: 25 points

Copy link

@stu-k stu-k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Map works, but your naming of the variables inside is misleading, filter is perfect, and forEach is a mess. I don't think this is your latest version of this project!

const forEach = (inputArray, inputFunction) => {
const anotherArr = [];
for (let i = 0; i < inputArray.length; i++){
anotherArr.push(inputFunction(inputArray[i]));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pushing to an array that isn't returned, then logging the length. This isn't what forEach() does.

// return anotherArr;
};
const fullArray = [1, 2, 3];
const inputFunction = i => fullArray.length;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stop using .length everywhere, you don't need it.

// }
const map = (arg1, arg2) => {
let nums = [];
arg1.forEach(index => nums.push(arg2(index)));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This map function works perfectly, but some of the things inside aren't named well. index isn't the index, it's the item, and the return array won't always be full of numbers, so nums doesn't make sense. But it works!

if(inFun(inpt[i])) {
arr1.push(inpt[i]);
}
}return arr1;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put the return on its own line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants